Skip to content

frontend: Fix exit from tray context menu#13621

Open
zorbathut wants to merge 1 commit into
obsproject:masterfrom
zorbathut:fix/tray-exit
Open

frontend: Fix exit from tray context menu#13621
zorbathut wants to merge 1 commit into
obsproject:masterfrom
zorbathut:fix/tray-exit

Conversation

@zorbathut

Copy link
Copy Markdown

Description

Due to unintuitive Qt behavior in Wayland, right-clicking tray context menu and choosing "exit" works only if the main window has already been displayed.

Work around by sending the close event manually when necessary.

Fixes #13494.

Motivation and Context

--minimize-to-tray allows starting in tray-minimized form. On Wayland, this prevents you from using the right-click menu to close it.

How Has This Been Tested?

Opened with --minimize-to-tray, verified I could close it. Opened without that, verified I could still close it. Opened with it and opened the window manually, verified I could still close it.

Tested on Manjaro Linux, Wayland, KDE desktop.

Types of changes

Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have read the contributing document.
  • My code has been run through clang-format.
  • My code follows the project's style guidelines
  • My code is not on the master branch.
  • My code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

Due to unintuitive Qt behavior, right-clicking tray context menu and
choosing "exit" works only if the main window has already been
displayed.

Work around by sending the close event manually when necessary.

Fixes obsproject#13494.
@WizardCM WizardCM added the kind/bug Categorizes issue or PR as related to a bug. label Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Categorizes issue or PR as related to a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to exit OBS Studio via system tray, if window was never visible

2 participants